package org.fcitmuk.openclinica;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

import org.fcitmuk.db.util.PersistentHelper;
import org.fcitmuk.epihandy.RequestHeader;

public class SubjectDownloadRequestHeader extends RequestHeader {

	private int cohortId;

	public SubjectDownloadRequestHeader(){
		super();
	}

	public int getCohortId() {
		return cohortId;
	}

	public void setCohortId(int cohortId) {
		this.cohortId = cohortId;
	}

	/**
	 * @see org.fcitmuk.db.util.Persistent#write(java.io.DataOutputStream)
	 */
	public void write(DataOutputStream dos) throws IOException{
		super.write(dos);
		dos.writeInt(getCohortId());
	}

	/**
	 * @see org.fcitmuk.db.util.Persistent#read(java.io.DataInputStream)
	 */
	public void read(DataInputStream dis) throws IOException,InstantiationException,IllegalAccessException{
		super.read(dis);
		setCohortId(dis.readInt());
	}
}
